public class Solid extends Shape{
    private double height;
    Shape shape;//底面图形

    public Solid() {
    }

    public Solid(double height, Shape shape) {
        this.height = height;
        this.shape = shape;
    }

    @Override
    double getArea() {
        return 0;
    }

    @Override
    double getCircumference() {
        return 0;
    }

    /**
     * 获取
     * @return height
     */
    public double getHeight() {
        return height;
    }

    /**
     * 设置
     * @param height
     */
    public void setHeight(double height) {
        this.height = height;
    }

    /**
     * 获取
     * @return shape
     */
    public Shape getShape() {
        return shape;
    }

    /**
     * 设置
     * @param shape
     */
    public void setShape(Shape shape) {
        this.shape = shape;
    }
    public double getVolume(){
        return shape.getArea()*height;
    }

    @Override
    public String toString() {
        return "Solid{height = " + height + ", shape = " + shape + "}";
    }
}
